#include "contacts.h"

void printContact(Contacts *c)
{
    cout << c->name << "  " << c->age<< "  " << c->sex<< "  " << c->phone << endl;
}

void addContacts(Contacts *c)
{
    cout << "姓名：" << endl;
    cin >> c->name;

    cout << "性别：" << endl;
    cout << "1-男" << endl;
    cout << "2-女" << endl;
    string sex;
    cin >> sex;
    if (sex == "1")
    {
        c->sex = "男";
    }
    else if (sex == "2")
    {
        c->sex = "女";
    }

    cout << "手机号：" << endl;
    cin >> c->phone;

    cout << "年龄：" << endl;
    cin >> c->age;
}